package com.jrtc.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.jrtc.base.entity.bo.PatientAppointment;
import com.jrtc.base.entity.vo.PatientAppointmentVo;
import com.jrtc.base.entity.vo.ReserveVo;

import java.util.List;

/**
 * 患者预约单表(PatientAppointment)表服务接口
 *
 * @author makejava
 * @since 2022-03-21 17:32:51
 */
public interface PatientAppointmentService {

    /**
     * 通过ID查询单条数据
     *
     * @param appointmentId 主键
     * @return 实例对象
     */
    PatientAppointment queryById(Integer appointmentId);

    /**
     * 查询多条数据
     *
     * @param offset 查询起始位置
     * @param limit 查询条数
     * @return 对象列表
     */
    List<PatientAppointment> queryAllByLimit(int offset, int limit);
    
    IPage<PatientAppointment> queryPatientAppointmentList(PatientAppointment patientAppointment);

    /**
     * 新增数据
     *
     * @param patientAppointment 实例对象
     * @return 实例对象
     */
    PatientAppointment insert(PatientAppointment patientAppointment);

    /**
     * 修改数据
     *
     * @param patientAppointment 实例对象
     * @return 实例对象
     */
    PatientAppointment update(PatientAppointment patientAppointment);

    /**
     * 通过主键删除数据
     *
     * @param appointmentId 主键
     * @return 是否成功
     */
    boolean deleteById(Integer appointmentId);

    /**
     * 患者预约列表
     * */
    public List<PatientAppointmentVo> selectPatientAppointmentList(String appointmentTime, String type, Integer patientId) throws Exception;

    /**
     * 患者创建新预约
     * */
    public int insertPatientAppointment(ReserveVo reserveVo, Integer patientId) throws Exception;
}